module Analyzer.D.lexical.module_file;
private import poseidon.util.File;
class Module
{
	private
	{
		private import std.file;
		char[] text;
	}
	public
	{
		this(){}
		
		this( char[] fileName )
		{
			if( exists( fileName ) )
			{
				// Kuan Hsu
				scope reader = new FileReader;
				int bom;
				//char[] tempText;
				reader.read( fileName, text, bom );
				//text = std.utf.toUTF32( tempText );
				// End of Kuan Hsu
			}
			else
			{
				throw new Exception( "NoExist" );
			}
		}

		char[] getText()
		{
			return text;
		}

		void setText( char[] _text ){ text = _text; } // Kuan Hsu
		
	}
}